<?php

class m150305_045633_htweb_user extends CDbMigration
{
	public function up()
	{
		$this->createTable('htweb_user', array(
			'id' => 'pk',
			'username' => 'VARCHAR(128) NOT NULL',
			'password' => 'VARCHAR(128) NOT NULL',
			'email'    => 'VARCHAR(128) NOT NULL'
		));

		$this->insert('htweb_user', array(
			'username' => 'admin',
			'password' => md5('admin'),
			'email'    => 'admin@htweb.com'
		));

		$this->createTable('htweb_user', array(
			'id' => 'pk',
			'username' => 'VARCHAR(128) NOT NULL',
			'password' => 'VARCHAR(128) NOT NULL',
			'email'    => 'VARCHAR(128) NOT NULL'
		));
	}

	public function down()
	{
		$this->dropTable('htweb_user');
	}

	/*
	// Use safeUp/safeDown to do migration with transaction
	public function safeUp()
	{
	}

	public function safeDown()
	{
	}
	*/
}